<%--
  Created by IntelliJ IDEA.
  User: 00
  Date: 2018/3/17
  Time: 0:36
  To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="/WEB-INF/jsp/comm/head.jsp"%>
    <title>Title</title>
</head>
<body>

<div class="container">
    <table>

        <c:forEach var="list" items="${l}">
                        <tr>
                            <th>编号</th>
                            <td class="col-md-4" onclick="cha(this)" name="aa">${list.poleInfo.poleCode}</td>
                        </tr>
        </c:forEach>
    </table>



    <div id="update">
        <form action="" class="form-horizontal">
           <c:forEach items="${ll}" var="ll">
               <div class="form-group">
                   <input type="hidden" name="taskId" value="${ll.taskId}">
                   <label for="" class="col-md-2 control-label">线路编号:</label>
                   <div class="col-md-8">
                       <input type="text" name="lineCode" value="${ll.lineCode}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                       <label for="" class="col-md-2 control-label">杆塔编号:</label>
                   <div class="col-md-8">
                       <input type="text" name="poleCode" value="${ll.poleCode}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                       <label for="" class="col-md-2 control-label">缺陷类别:</label>
                   <div class="col-md-8">
                       <input type="text" name="bugTypeName" value="${ll.bugTypeName}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                   <label for="" class="col-md-2 control-label">缺陷类型:</label>
                   <div class="col-md-8">
                       <input type="text" name="bugLevelName" value="${ll.bugLevelName}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                   <label for="" class="col-md-2 control-label">完好率:</label>
                   <div class="col-md-8">
                       <input data-formatter="wcl" type="text" name="intactRate" value="${ll.intactRate}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                   <label for="" class="col-md-2 control-label">发现时间:</label>
                   <div class="col-md-8">
                       <input type="text" name="discoverTime" value="${ll.discoverTime}" class="form-control">
                   </div>
               </div>
               <div class="form-group">
                   <label for="" class="col-md-2 control-label">发现人员:</label>
                   <div class="col-md-8">
                       <input type="text" name="createdBy" value="${ll.createdBy}" class="form-control">
                   </div>
               </div>
               <div class="col-md-8">
                       <button class="btn btn-danger" onclick="hzwcupdate(this)">保存</button>
               </div>
           </c:forEach>
        </form>
    </div>

</div>

<%@include file="/WEB-INF/jsp/comm/foot.jsp"%>
<script>
    function cha(wo){
        var code=$(wo).parent().find('[name=aa]').html();
        var url="sys/get/getByCode?configCode="+code;
        location.href=url;
    }

    function wcl(value,row){
        return value=value+"%";
    }

    function hzwcupdate(aa){
        alert($("[name=taskId]").val());
        $.post(ctx+"xj/qxdj/hzwcupdate",{taskId:$("[name=taskId]").val()},function(isOk){
            toastr.warning("信息提示",isOk);
            $("#table").bootstrapTable("refresh");
        })
    }


</script>
</body>
</html>
